package com.o2o.app.userCenter;

/**
 * 登陆界面
 */
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.o2o.app.R;
import com.o2o.app.service.CommunityServiceActivity;

public class LoginActivity extends Activity {
	/**
	 * 忘记密码按钮
	 */
	private TextView tv_forget_pass;

	/**
	 * 快速注册按钮
	 */
	private TextView btn_register;

	/**
	 * 登陆按钮
	 */
	private Button btn_denglu;

	/**
	 * 返回按钮
	 */
	private Button btn_back;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login);

		initViews();
	}

	/**
	 * 初始化资源
	 */
	private void initViews() {
		// 忘记密码
		tv_forget_pass = (TextView) findViewById(R.id.tv_forget_pass);
		tv_forget_pass.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(LoginActivity.this,
						ResetPasswordActivity.class);

				startActivity(intent);
			}
		});

		// 快速注册
		btn_register = (Button) findViewById(R.id.btn_register);
		btn_register.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(LoginActivity.this,
						UserRegisterActivity.class);

				startActivity(intent);
			}
		});

		// 登陆
		btn_denglu = (Button) findViewById(R.id.btn_denglu);
		btn_denglu.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(LoginActivity.this,
						MineUserCenterActivity.class);

				startActivity(intent);
			}
		});

		// 返回按钮
		btn_back = (Button) findViewById(R.id.btn_back);
		btn_back.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(LoginActivity.this,
						CommunityServiceActivity.class);

				startActivity(intent);
			}
		});
	}
}
